#pragma once
/***********************************************************************************************
COPYRIGHT 2011 Mafahir Fairoze

This file is part of Neural++.
(Project Website : http://mafahir.wordpress.com/projects/neuralplusplus)

Neural++ is a free software. You can redistribute it and/or modify it under the terms of
the GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.

Neural++ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License <http://www.gnu.org/licenses/> for more details.

***********************************************************************************************/

#include "../AbstractFunction.h"

namespace NeuralPlusPlus
	{
	namespace Core
		{
		namespace LearningRateFunctions

			{
			/// <summary>
			/// Hyperbolic Learning Rate Function. As training progresses, The learning rate hyperbolically
			/// changes from its initial value to the final value.
			/// </summary>
			class HyperbolicFunction : public AbstractFunction
				{
				private: double product;

						 /// <summary>
						 /// Constructs a new instance of the hyperbolic function with the specified initial and
						 /// final values of learning rate.
						 /// </summary>
				public: HyperbolicFunction(double initialLearningRate, double finalLearningRate);

						/// <summary>
						/// Gets effective learning rate for current training iteration. (As training progresses, The
						/// learning rate hyperbolically changes from its initial value to the final value)
						/// </summary>
				public: double GetLearningRate(int currentIteration, int trainingEpochs) override;
				};
			}
		}
	}